<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>
<link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<title>后台管理</title>
</head>
<body class="body_ifm">
<div class="infoboxp">
<div class="infoboxp_top_bg"></div>
<div id="subboxdiv" style="width:100%;height:100%;display:none;position:absolute;"></div>
<div class="infoboxp_top infoboxp_topIjf">
    <span class="infoboxp_top_span">短网址生成</span>
</div>
<div class="main_tag">
<div class="clear"></div>
<div class="admin_table_border">
<div>

<table width="100%" class="table_form">
  <tr>
         <th width="220" bgcolor="#f0f6fb"><span class="admin_bold">参数说明</span></th>
          <td bgcolor="#f0f6fb"><span class="admin_bold">参数值</span></td>
    </tr>
 
	<tr class="admin_table_trbg">
		<th width="220">新浪APIkey：</th>
		<td><input class="input_text_w150" type="text" name="key" id="key" value="{yun:}$config.turlkey{/yun}" size="10" maxlength="255" />  <span class="admin_web_tip">提示：都需平台站长帐号</span></td>
	</tr>
    <tr>
		<td colspan="2" align="center" style="border-bottom:none;">
        <input class="admin_button" id="config" type="button" name="config" value="提交" />&nbsp;&nbsp;
        <input class="admin_button" type="reset" value="重置" /></td>
	</tr>
</table>

<table width="100%" class="table_form">
  <tr>
         <th width="220" bgcolor="#f0f6fb"><span class="admin_bold">参数说明</span></th>
          <td bgcolor="#f0f6fb"><span class="admin_bold">参数值</span></td>
    </tr>
 
	<tr class="admin_table_trbg">
		<th width="220">原始链接：</th>
		<td><input class="input_text_w150" type="text" name="url" id="url" value="" size="40" />  <span class="admin_web_tip">提示：需要生成短网址的URL链接</span></td>
	</tr>
	<tr class="admin_table_trbg" style="display:none;" id='turltb'>
		<th width="220">生成后短网址：</th>
		<td><input class="input_text_w150" type="text"  id="turl" value="{yun:}$config.dx_key{/yun}" size="40"/>  <span class="admin_web_tip">提示：生成后的短网址链接（此处使用百度短网址接口）</span></td>
	</tr>
	
    <tr>
		<td colspan="2" align="center" style="border-bottom:none;">
        <input class="admin_button" id="config" type="button" name="seturl" value="生成" />&nbsp;&nbsp;
	</tr>
</table>

</div>

</div>
</div>
</div>
<input type="hidden" name="pytoken" id='pytoken' value="{yun:}$pytoken{/yun}">
<script>
$(function(){
	$(".tips_class").hover(function(){ 
		var msg_id=$(this).attr('id'); 
		var msg=$('#'+msg_id+' + font').html();
		if($.trim(msg)!=''){
			layer.tips(msg, this, {
			guide: 1, 
			style: ['background-color:#5EA7DC; color:#fff;top:-7px', '#5EA7DC']
			}); 
			$(".xubox_layer").addClass("xubox_tips_border");
		} 
	},function(){
		var msg_id=$(this).attr('id');
		var msg=$('#'+msg_id+' + font').html();
		if($.trim(msg)!=''){
			layer.closeAll('tips');
		} 
	});
	$("#seturl").click(function(){
		$.post("index.php?m=admin_turl&c=set",{
			url : $("#url").val(),
			pytoken : $("#pytoken").val()
		},function(data,textStatus){
			$('#turltb').show();
			$('#turl').val(data);
		});
	});
	$("#config").click(function(){
		$.post("index.php?m=admin_turl&c=save",{
			turlkey : $("#url").val(),
			pytoken : $("#pytoken").val()
		},function(data,textStatus){
			config_msg(data);
		});
	});
})
</script>
</body>
</html>